import Layout from '../views/Layout.vue'

export const asyncRouterMap = [
    {
        path: '/users',
        name: 'users',
        component: Layout,
        meta: {
            title: '用户管理'
        },
        children: [
            {
                path: 'user',
                name: 'user',
                component: () => import('@/views/user/userlist.vue'),
                meta: {
                    keepAlive: true,
                    title: '用户管理-用户列表'
                }
            }
        ]
    },
    // 库存管理
    //   订单管理
    //   订单详情
    //   仓库管理
    //   仓库详情
    //   原料管理
    //   供应商管理
    // **/
    {
        path: '/inventorymanager',
        name: 'inventorymanager',
        component: Layout,
        meta: {
            title: '库存管理'
        },
        children: [
            {
                path: 'ware_manager',
                name: 'ware_manager',
                component: () => import('@/views/inventorymanager/ware_manager.vue'),
                meta: {
                    keepAlive: true,
                    title: '仓库管理'
                }
            },
            {
                path: 'ware_detail',
                name: 'ware_detail',
                component: () => import('@/views/inventorymanager/ware_detail.vue'),
                meta: {
                    isLeaf: true,
                    title: '仓库详情'
                }
            },
            {
                path: 'order_manager',
                name: 'order_manager',
                component: () => import('@/views/inventorymanager/order_manager.vue'),
                meta: {
                    // keepAlive: true,
                    title: '订单管理'
                }
            },
            {
                path: 'order_detail',
                name: 'order_detail',
                component: () => import('@/views/inventorymanager/order_detail.vue'),
                meta: {
                    title: '订单详情'
                }
            },
            {
                path: 'row_manager',
                name: 'row_manager',
                component: () => import('@/views/inventorymanager/row_manager.vue'),
                meta: {
                    title: '原料管理'
                }
            },
            {
                path: 'supplier_manager',
                name: 'supplier_manager',
                component: () => import('@/views/inventorymanager/supplier_manager.vue'),
                meta: {
                    title: '供应商管理'
                }
            },
            {
                path: 'dispatch_order',
                name: 'dispatch_order',
                component: () => import('@/views/inventorymanager/dispatch_order.vue'),
                meta: {
                    title: '发货单'
                }
            },
            {
                path: 'ware_pro_manager',
                name: 'ware_pro_manager',
                component: () => import('@/views/inventorymanager/ware_pro_manager.vue'),
                meta: {
                    title: '仓库商品管理'
                }
            },
            {
                path: 'cash_pro_manager',
                name: 'cash_pro_manager',
                component: () => import('@/views/inventorymanager/cash_pro_manager.vue'),
                meta: {
                    title: '收银商品管理'
                }
            },
            {
                path: 'inventory_statis',
                name: 'inventory_statis',
                component: () => import('@/views/inventorymanager/inventory_statis.vue'),
                meta: {
                    title: '库存统计'
                }
            },
            {
                path: 'inventory_record',
                name: 'inventory_record',
                component: () => import('@/views/inventorymanager/inventory_record.vue'),
                meta: {
                    title: '库存管理-库存记录'
                }
            },
            {
                path: 'pro_loss',
                name: 'pro_loss',
                component: () => import('@/views/inventorymanager/pro_loss.vue'),
                meta: {
                    title: '库存管理-商品报损'
                }
            },
            {
                path: 'cost_card',
                name: 'cost_card',
                component: () => import('@/views/inventorymanager/cost_card.vue'),
                meta: {
                    title: '库存管理-成本卡'
                }
            },
            {
                path: 'stock_transfer',
                name: 'stock_transfer',
                component: () => import('@/views/inventorymanager/stock_transfer.vue'),
                meta: {
                    title: '库存管理-库存调拨'
                }
            },
            {
                path: 'stock_check',
                name: 'stock_check',
                component: () => import('@/views/inventorymanager/stock_check.vue'),
                meta: {
                    title: '库存管理-库存盘点'
                }
            },
            {
                path: 'purchase_request',
                name: 'purchase_request',
                component: () => import('@/views/purchas_manager/purchase_request.vue'),
                meta: {
                    title: '库存管理-采购申请'
                }
            },
            {
                path: 'purchase_delivery',
                name: 'purchase_delivery',
                component: () => import('@/views/purchas_manager/purchase_delivery.vue'),
                meta: {
                    title: '库存管理-采购发货'
                }
            },
            {
                path: 'purchase_inware',
                name: 'purchase_inware',
                component: () => import('@/views/purchas_manager/purchase_inware.vue'),
                meta: {
                    title: '库存管理-采购入库'
                }
            },
            {
                path: 'purchase_pro_log',
                name: 'purchase_pro_log',
                component: () => import('@/views/purchas_manager/purchase_pro_log.vue'),
                meta: {
                    title: '库存管理-仓库商品批次'
                }
            },
            {
                path: 'pro_type',
                name: 'pro_type',
                component: () => import('@/views/inventorymanager/pro_type.vue'),
                meta: {
                    title: '库存管理-商品分类'
                }
            },
            {
                path: 'pro_unit_manager',
                name: 'pro_unit_manager',
                component: () => import('@/views/inventorymanager/pro_unit_manager.vue'),
                meta: {
                    title: '库存管理-商品单位管理'
                }
            }
        ]
    },
    /**
     * 门店相关
     * */
    {
        path: '/storesystem',
        name: 'storesystem',
        component: Layout,
        meta: {
            title: '门店系统'
        },
        children: [
            {
                path: 'store_manager',
                name: 'store_manager',
                component: () => import('@/views/storesystem/store_manager.vue'),
                meta: {
                    keepAlive: true,
                    title: '门店系统-门店管理'
                }
            },
            {
                path: 'store_info_manager',
                name: 'store_info_manager',
                component: () => import('@/views/storesystem/store_info_manager.vue'),
                meta: {
                    title: '门店系统-门店信息绑定'
                }
            },
            {
                path: 'store_detail',
                name: 'store_detail',
                component: () => import('@/views/storesystem/store_detail.vue'),
                meta: {
                    title: '门店系统-门店详情'
                }
            },
            {
                path: 'order_detail',
                name: 'order_detail',
                component: () => import('@/views/inventorymanager/order_detail.vue'),
                meta: {
                    // 不需要缓存
                    title: '库存管理-订单详情'
                }
            },
        ]
    },
    /* oa管理
    //   部门管理
    //   员工管理
    //   职位管理
    //   物流商管理
    // **/
    {
        path: '/oa',
        name: 'oa',
        component: Layout,
        meta: {
            title: 'oa系统'
        },
        children: [
            {
                path: 'department_manager',
                name: 'department_manager',
                component: () => import('@/views/oa/department_manager.vue'),
                meta: {
                    title: 'oa系统-部门管理'
                }
            },
            {
                path: 'employee_manager',
                name: 'employee_manager',
                component: () => import('@/views/oa/employee_manager.vue'),
                meta: {
                    title: 'oa系统-员工管理'
                }
            },
            {
                path: 'position_manager',
                name: 'position_manager',
                component: () => import('@/views/oa/position_manager.vue'),
                meta: {
                    title: 'oa系统-职位管理'
                }
            },
            {
                path: 'logistics_manager',
                name: 'logistics_manager',
                component: () => import('@/views/oa/logistics_manager.vue'),
                meta: {
                    title: 'oa系统-物流商管理'
                }
            }
        ]
    },
    /**
     * 财务审核管理
     * 退款单管理
     * 充值审核
     * */
    {
        path: '/finace_system',
        name: 'finace_system',
        component: Layout,
        meta: {
            title: '财务审核系统'
        },
        children: [
            {
                path: 'refund_list',
                name: 'refund_list',
                component: () => import('@/views/finance_system/refund_list.vue'),
                meta: {
                    title: '财务审核系统-退款单'
                }
            },
            {
                path: 'recharge_approve',
                name: 'recharge_approve',
                component: () => import('@/views/finance_system/recharge_approve.vue'),
                meta: {
                    title: '财务审核系统-充值审核'
                }
            },
        ]
    },
    /**
     * 管理中心
     * */
    {
        path: '/manager_center',
        name: 'manager_center',
        component: Layout,
        meta: {
            title: '管理中心'
        },
        children: [
            {
                path: 'ability_list',
                name: 'ability_list',
                component: () => import('@/views/manager_center/ability_list.vue'),
                meta: {
                    title: '管理中心-功能列表'
                }
            },
            {
                path: 'menu_manager',
                name: 'menu_manager',
                component: () => import('@/views/manager_center/menu_manager.vue'),
                meta: {
                    title: '管理中心-菜单管理'
                }
            },
        ]
    },
]
